#include <stdio.h>
#include <string.h>
#include <stdlib.h>

typedef  unsigned Int;






void  hanoi(Int n,int d)
{

	if(n<=0)return;
	
	hanoi(n-1,-d);

	printf("%d,%d\n",n,d);

	hanoi(n-1,-d);

}




int main(int argc,char **argv)
{



	Int n=atoi(*(argv+1));

	hanoi(n,1);

	return 0;
}
